//
//  JAllCommentTableCell.m
//  HeadIndustry
//
//  Created by jun on 2017/9/2.
//  Copyright © 2017年 jun. All rights reserved.
//

#import "JAllCommentTableCell.h"

@implementation JAllCommentTableCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        self.opaque = NO;
        self.backgroundColor = [UIColor whiteColor];
        
        [self setUpBgView];
    }
    return self;
}

- (void)setUpBgView {
    _headImg = [CALayer layer];
    _headImg.left = 15;
    _headImg.top = 15;
    _headImg.size = CGSizeMake(30, 30);
    _headImg.backgroundColor = [UIColor grayColor].CGColor;
    _headImg.cornerRadius = 15;
    [self.layer addSublayer:_headImg];
    
    _nameLa = [YYLabel new];
    _nameLa.left = _headImg.right + 20;
    _nameLa.top = 10;
    _nameLa.size = CGSizeMake(kWindowW - 65 - 15, 30);
    _nameLa.text = @"测试";
    _nameLa.textColor = [UIColor blackColor];
    _nameLa.font = kFONT_TITLE(16);
    _nameLa.textAlignment = NSTextAlignmentLeft;
    [self addSubview:_nameLa];
    
    _timeLabel = [YYLabel new];
    _timeLabel.left = 15;
    _timeLabel.top = _headImg.bottom + 15;
    _timeLabel.size = CGSizeMake(kWindowW - 30 - 80, 20);
    _timeLabel.text = @"2017-09-02 23:23:23";
    _timeLabel.textColor = kRGBColor(150, 150, 150);
    _timeLabel.font = kFONT_TITLE(14);
    _timeLabel.textAlignment = NSTextAlignmentLeft;
    _timeLabel.numberOfLines = 0;
    [self addSubview:_timeLabel];
    
    _contentLa = [YYLabel new];
    _contentLa.left = 15;
    _contentLa.top = _timeLabel.bottom + 5;
    _contentLa.size = CGSizeMake(kWindowW - 30, 30);
    _contentLa.text = @"测试";
    _contentLa.textColor = kRGBColor(104, 104, 104);
    _contentLa.font = kFONT_TITLE(14);
    _contentLa.textAlignment = NSTextAlignmentLeft;
    _contentLa.numberOfLines = 0;
    [self addSubview:_contentLa];
    
    
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
